<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<c:if test="${requestScope.rightWay eq null}">
    <jsp:forward page="HttpMethodServlet?action=Admin&task=overview"/>
</c:if>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Rabbit Buster Administration</title>

<link href="css000.css" rel="stylesheet" type="text/css">

</head>
<body>
<div align="center">
  <p><img src="./pics/banner_ad.png" alt="banner"></p>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table>
<tr><th>GameID</th><th>Name</th><th>Players</th><th>remaining TS</th><th>Highscore</th><th>stop Game</th></tr>
<c:forEach items="${games}" var="game">
		<tr> 
			<td><c:out value="${game.ID}"/> </td>
			<td><a href="HttpMethodServlet?action=Info&task=status&game=<c:out value="${game.ID}"/>"><c:out value="${game.name}"/></a></td>
			<td><c:out value="${game.hunterCount}"/> </td>
			<td><c:out value="${game.remainingTimeSlices}"/> </td>
			<td><a href="score.jsp?game=<c:out value="${game.ID}"/>">Score</a></td>
			<td><div align="center">
			<a href="./HttpMethodServlet?action=Admin&task=stop&game=<c:out value="${game.ID}"/>">
			<img src="./pics/stop.png" alt="Stop" border="0"></a>
			</div></td>
		</tr>
</c:forEach>
</table>
<br><br>
<h1>New Game:</h1>
<br>
<form method="post" action="./HttpMethodServlet">
<input type="hidden" name="action" value="Admin" />
<input type="hidden" name="task" value="newGame" />

<table>
	<tr><td>Name:</td><td class=input"><input type="text" name="name" value="Game" /></td><td colspan="2"></td></tr>
	<tr><td>Duration:</td><td><input type="text" name="duration" value="-1" /></td><td colspan="2">(-1 means infinitive)</td></tr>
	<tr><td colspan="4">Area Pos1:</td></tr>
	<tr><td>Latitutde:</td><td><input type="text" name="xlat" value="47.40635"/></td>
	    <td>Longitude:</td><td><input type="text" name="xlong" value="9.742775" /></td></tr>
	<tr><td colspan="4">Area Pos2:</td></tr>
	<tr><td>Latitutde:</td><td><input type="text" name="ylat" value="47.406935" /></td>
		<td>Longitude:</td><td><input type="text" name="ylong" value="9.744105" /></td></tr>
	<tr><td colspan="4" align="center"><input type="submit" value="Start Game"><input type="reset" value="reset"></td></tr>
</table>
</form>
<br>
<div id="Center">
<a class=biglink href="index.jsp">back to index</a>
</div>

</body>
</html>